f6a5908577dcd464fd9d9a0496a0da84f2e779cb,src/main/java/net/foxdenstudio/sponge/foxguard/plugin/controller/LogicController.java,LogicController,modifySuggestions,#CommandSource#String#Location#,195
Before Change
.parse();
if (parse.current.type == AdvCmdParser.CurrentElement.ElementType.ARGUMENT) {
if (parse.current.index == 0) {
return ImmutableList.of("operator", "mode", "short").stream()
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
} else if (parse.current.index == 1) {
if (isIn(OPERATOR_ALIASES, parse.args[0])) {
return Arrays.stream(Operator.values())
.map(Enum::name)
.map(String::toLowerCase)
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
} else if (isIn(MODE_ALIASES, parse.args[0])) {
return ImmutableList.of("allow", "deny", "pass").stream()
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
} else if (isIn(SHORT_ALIASES, parse.args[0])) {
return ImmutableList.of("true", "false").stream()
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
}
After Change
.parse();
if (parse.current.type == AdvCmdParser.CurrentElement.ElementType.ARGUMENT) {
if (parse.current.index == 0) {
return Stream.of("operator", "mode", "short")
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
} else if (parse.current.index == 1) {
if (isIn(OPERATOR_ALIASES, parse.args[0])) {
return Arrays.stream(Operator.values())
.map(Enum::name)
.map(String::toLowerCase)
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
} else if (isIn(MODE_ALIASES, parse.args[0])) {
return Stream.of("allow", "deny", "pass")
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
} else if (isIn(SHORT_ALIASES, parse.args[0])) {
return Stream.of("true", "false")
.filter(new StartsWithPredicate(parse.current.token))
.map(args -> parse.current.prefix + args)
.collect(GuavaCollectors.toImmutableList());
}